package Day2025_03_03;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class HomeWork01 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int[] hash = new int[10];
        while (in.hasNextInt()) {
            int ret = in.nextInt();
            hash[ret]++;
        }
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < hash.length; i++) {
            if (hash[i] == 3) list.add(i);
        }
        System.out.println(Arrays.toString(list.toArray()));
    }
}
